/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package agency.tango.materialintroscreen.listeners;

import ohos.agp.components.Component;
import ohos.multimodalinput.event.TouchEvent;

/**
 * @ProjectName: material-intro-screen-master
 * @Package: agency.tango.materialintroscreen.listeners
 * @ClassName: GiveTouchToParentListener
 * @Description: 因为鸿蒙暂未提供类似onInterceptTouchEvent 所以用接口将子类
 * 的onTouch回调，在父类里面实现 并调用相关方法
 * @CreateDate: 2021/4/12 16:47
 * @UpdateDate: 2021/4/12 16:47
 * @UpdateRemark: 暂无
 * @Version: 1.0
 */
public interface GiveTouchToParentListener{
    /**
     * 手指按下
     *
     * @param componet 触摸的控件
     * @param event 触摸事件
     */
    void onTouchDown(Component componet, TouchEvent event);
    /**
     * 手指滑动
     *
     * @param componet 触摸的控件
     * @param event 触摸事件
     */
    void onTouchMove(Component componet,TouchEvent event);
    /**
     * 手指抬起
     *
     * @param componet 触摸的控件
     * @param event 触摸事件
     */
    void onTouchUp(Component componet,TouchEvent event);

    /**
     * 最后一页右滑的时候需要将translateX置为0
     *
     * @param componet 触摸的控件
     * @param event 触摸事件
     */
    void onTransToOrigin(Component componet,TouchEvent event);
}
